Skip to content

Blockchain: Support EVM#65

Open
manu-xmint wants to merge 8 commits intomainfrom
feature/add-evm-support
Open

Blockchain: Support EVM#65
manu-xmint wants to merge 8 commits intomainfrom
feature/add-evm-support

Conversation

@manu-xmint
Copy link
Collaborator

@manu-xmint manu-xmint commented Feb 1, 2026

Blockchain: Support EVM

Important Files Changed

Filename Overview
shared/chains/evm/EVMProvider.ts New EVM provider implementation with proper address validation using ethers.js, private key validation with hex format checking, and transaction signing support
shared/chains/ChainFactory.ts Well-designed factory pattern for blockchain providers with helper methods for UI option generation and network resolution
shared/chains/solana/SolanaProvider.ts Refactored Solana implementation into provider pattern with base58 validation and Ed25519 key derivation
shared/actions/wallet/signTransaction.operation.ts Updated to support multiple chain types with dynamic parameter selection, but uses string literal 'solana' instead of constant
nodes/CrossmintWallets/CrossmintWallets.node.ts Significantly simplified by extracting 600+ lines of property definitions into reusable helper functions, added dynamic network options loading

Context used:

  • Rule from dashboard - Use enum constants (e.g., Chain.SOLANA, Chain.BASE) instead of string literals when comparing chain ... (source)

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment on lines +81 to +83
const chain = chainType === 'solana'
? context.getNodeParameter('signSubmitChainSolana', itemIndex) as string
: context.getNodeParameter('signSubmitChainEvm', itemIndex) as string;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use chain type constant instead of string literal 'solana' for consistency and type safety

Suggested change
const chain = chainType === 'solana'
? context.getNodeParameter('signSubmitChainSolana', itemIndex) as string
: context.getNodeParameter('signSubmitChainEvm', itemIndex) as string;
const chain = chainType === ChainFactory.getSupportedChainTypes()[0] // 'solana'
? context.getNodeParameter('signSubmitChainSolana', itemIndex) as string
: context.getNodeParameter('signSubmitChainEvm', itemIndex) as string;

Or better yet, consider creating a Chain enum/const object to use here instead of the magic string.

Context Used: Rule from dashboard - Use enum constants (e.g., Chain.SOLANA, Chain.BASE) instead of string literals when comparing chain ... (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Prompt To Fix With AI
This is a comment left during a code review.
Path: shared/actions/wallet/signTransaction.operation.ts
Line: 81:83

Comment:
Use chain type constant instead of string literal `'solana'` for consistency and type safety

```suggestion
	const chain = chainType === ChainFactory.getSupportedChainTypes()[0] // 'solana'
		? context.getNodeParameter('signSubmitChainSolana', itemIndex) as string
		: context.getNodeParameter('signSubmitChainEvm', itemIndex) as string;
```

Or better yet, consider creating a Chain enum/const object to use here instead of the magic string.

**Context Used:** Rule from `dashboard` - Use enum constants (e.g., Chain.SOLANA, Chain.BASE) instead of string literals when comparing chain ... ([source](https://app.greptile.com/review/custom-context?memory=0e60096d-0843-4800-801b-f8a78b766fbc))

<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>

How can I resolve this? If you propose a fix, please make it concise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant